//: Playground - noun: a place where people can play

import UIKit
var str :String?
str = "Hello, playground"
let width = 40

print("\(String(width))")
print(width)
let emptyArray = [String]()
var shoppingList = [Any]()
var emptyDictionary = [String:String]()
var ssss :[ String:String]? = ["key":"key"]

var ssss1 :[ String:String]? = [:]
var ssss2 = [String:String]()   //必须得有类型
print("\(ssss)")
emptyDictionary = [:]
emptyDictionary.updateValue("nihao ", forKey: "keyke")
emptyDictionary["key"] = "this key is key "
print("    \(emptyDictionary)")
//if let dic = emptyDictionary , emptyDictionary.count >0{
//    print("字典不是空")
//}




let name  = "name"

switch name {
case "aaron1":
    print("this name is \(name)")
case let _name where _name.characters.count>5:
    print("name > 5")
case let _name where _name.characters.count>3:
      print("name > 3")
default:
    print("this is default")
}

var name1 :String? = "name1"
if let _name = name1 , _name.characters.count>0{  //一个 , 一个 where
    print("this is name \(_name)")
}



